<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix='sec' uri='http://www.springframework.org/security/tags'%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<script type="text/javascript" src="scripts/boot.js"></script>
</head>
<body style="border: 0px; margin: 0px; padding: 0px;width: 100%;height: 100%">
	<div class="mini-toolbar" style="border-bottom:0;padding:0px;">
	    <table style="width:100%;">
	        <tr>
	            <td style="width:100%;">
	            	<sec:authorize url='/my_remind_current_export.do'>
	                <a class="mini-button" iconCls="icon-download" onclick="exportCurrentData()">导出当前</a>
	                </sec:authorize>
	                <sec:authorize url='/my_remind_export.do'>
		            <a class="mini-button" iconCls="icon-download" onclick="exportData()">导出全部</a>     
		            </sec:authorize>
	            </td>
	        </tr>
	    </table>           
	</div>
	<div class="mini-fit" >
	<div id="datagrid1" class="mini-datagrid " idField="id" pageSize="20" url="my_remind_view.do" style="width:100%;height:100%;">
		<div property="columns">
			<div type="indexcolumn"></div>
			<div field="operatorUser" width="100" headerAlign="center" align="center">提醒客服</div>
			<div field="customerName" width="100" headerAlign="center" align="center">客户</div>
			<div field="content" width="200" headerAlign="center" align="center">提醒内容</div>
			<div field="reminderTime" width="100" allowSort="true" headerAlign="center" align="center">提醒时间</div>
			<div field="cycleVal" width="100" headerAlign="center" align="center">提醒周期</div>
		</div>
	</div>
	</div>
<script type="text/javascript">
mini.parse();
var grid = mini.get("datagrid1");
grid.load();

function search() {
    grid.load();
}

function onKeyEnter(e) {
    search();
}
//导出全部
function exportData() {
	location.href="my_remind_export.do";
}

//导出当前页数据
function exportCurrentData() {
	var data =grid.getData();
	var ids = [];
	$.each(data , function(){
        ids.push(this.id);
    });
	 var id = ids.join(',');
	 location.href="my_remind_current_export.do?ids=" +id;
}
</script>
</body>
</html>